FROM centos
RUN yum install wget -y && rm -f /etc/yum.repos.d/* \
    && wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo \
    && yum clean all && yum makecache  \
    && yum install etcd -y \
    && yum clean all

CMD ["--name=etcd",         "--data-dir=/var/lib/etcd/default.etcd",         "--listen-peer-urls=http://0.0.0.0:2380",         "--advertise-client-urls=http://0.0.0.0:2379",         "--initial-cluster-token=etcd-cluster",         "--initial-cluster=etcd=http://0.0.0.0:2380",         "--initial-cluster-state=new",         "--listen-client-urls=http://0.0.0.0:2379","--initial-advertise-peer-urls=http://0.0.0.0:2380"]
ENTRYPOINT ["etcd"]
